<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Title</title>
</head>
<body>
<div id="app">
  <!--2.阻止默认事件 @click.prevent -->
  <form action="http://www.jd.com">
    <input type="submit" value="提交" @click.prevent="doSubmit">
  </form>
</div>


<script src="../js/vue.js"></script>
<script>
  // 1.创建Vue的实例对象
  const app = Vue.createApp({
    data(){
      return {
        count: 0,
      }
    },
    methods:{
      doSubmit(){
        console.log('表单提交')
      }
    }
  }).mount('#app');
</script>
</body>
</html>